import 'dart:async';

import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/cupertino.dart';
import 'package:school_safe_teacher/resourse/app_colors.dart';


class ChangePwdState implements Cloneable<ChangePwdState> {
  String mobile;
  String code;
  TextEditingController phoneController;
  int countdownTime;
  String countdownString;
  Timer countdownTimer;
  Color textColor;
  String pwd;
  bool showPwd;
  String pwdCanSeeImg;

  Color loginTextColor;
  Color loginBtnStartColor;
  Color loginBtnEndColor;

  @override
  ChangePwdState clone() {
    return ChangePwdState()
      ..mobile = mobile
      ..pwd = pwd
      ..showPwd = showPwd
      ..code = code
      ..pwdCanSeeImg = pwdCanSeeImg
      ..phoneController = phoneController
      ..countdownTimer = countdownTimer
      ..countdownTime = countdownTime
      ..countdownString = countdownString
      ..loginTextColor = loginTextColor
      ..loginBtnStartColor = loginBtnStartColor
      ..loginBtnEndColor = loginBtnEndColor
      ..textColor = textColor;
  }
}

ChangePwdState initState(Map<String, dynamic> args) {
  TextEditingController phoneController = TextEditingController();
  return ChangePwdState()
    ..mobile = ""
    ..pwd =""
    ..code = ""
    ..phoneController = phoneController
    ..loginTextColor = AppColors.cantClickTextColor
    ..loginBtnStartColor = AppColors.loginBtnColor
    ..loginBtnEndColor = AppColors.loginBtnColor
    ..showPwd = true
    ..countdownTime = 0
    ..pwdCanSeeImg = "images/pwd_cannot_see@2x.png"
    ..countdownString = "发送验证码"
    ..textColor = AppColors.loginLeft;
}
